<script setup>
import { watchEffect, ref, nextTick } from "vue";
import Contract from "./Contract.vue";
import Publication from "./Publication.vue";
import { ElTabPane, ElTabs } from "element-plus";
const activeName = ref("first");
const ContractRef = ref();
const PublicationRef = ref();
function handleChange(params) {
  params == "first"
    ? ContractRef.value?.handleRefresh()
    : PublicationRef.value?.handleRefresh();
}
</script>
<template>
  <el-tabs v-model="activeName" @tab-change="handleChange">
    <el-tab-pane label="合同签订统计" name="first">
      <Contract ref="ContractRef"
    /></el-tab-pane>
    <el-tab-pane label="上刊率统计" name="second">
      <Publication ref="PublicationRef"
    /></el-tab-pane>
  </el-tabs>
</template>
<style lang="scss" scoped>
@import url("@/styles/daily.scss");
</style>
